#include "../Headers/day07_homework.h"   
graph::graph(){}
graph ::~graph(){}

rectangle::rectangle(float lenth,float wide):graph(){
    this->lenth = lenth;
    this->wide = wide;
}
rectangle::~rectangle(){}

double rectangle:: perimeter(){
    return 2*(this->lenth+this->wide);
}
double rectangle:: area(){
    return lenth*wide;
}

triangle :: triangle(float bottom,float height){
    this->bottom = bottom;
    this->height = height;
}
triangle:: ~triangle(){}

double triangle:: perimeter(){
    return sqrt(this->bottom*this->bottom+this->height*this->height);
}
double triangle:: area(){
    return this->bottom*this->height/2;
}

circle :: circle(float radius){
    this->radius=radius;
}
circle:: ~circle(){}
double circle::perimeter(){
    return 2*this->PAI*this->radius;
}
double circle:: area(){
    return PAI*radius*PAI*radius;
}
